package helexis.game.tyrian.domain;

import java.util.Locale;

import helexis.game.tyrian.utils.TextUtils;

/**
 * 캐릭터 - 우주선 - 의 전면 총
 * 
 * @author 조만희
 *
 */
public enum FrontGun implements Item {
	
	PULSE_CANNON("Pulse-Cannon", 500, Shot.BULLET),
	MISSILE_LAUNCHER("Missile Launcher", 1000, Shot.MISSILE),
	VULCAN_CANNON("Vulcan Cannon", 2000, Shot.FIREBALL),
	PROTON_LAUNCHER("Proton Launcher", 3500, Shot.PROTON),
	WAVE_CANNON("Wave-Cannon", 5000, Shot.WAVE);
	
	/**
	 * 전면 총 아이템 이름
	 */
	private final String name;
	/**
	 * 전면 총 아이템 가격
	 */
	private final int price;
	/**
	 * 전면 총 아이템에서 발사되는 총알
	 */
	private final Shot shot;
	
	
	private FrontGun(String name, int price, Shot shot) {
		this.name = name;
		this.price = price;
		this.shot = shot;
	}//end of constructor()
	
	
	public String getName() {
		return this.name;
	}//end of getName()
	
	
	@Override
	public int getPrice() {
		return this.price;
	}//end of getPrice()
	
	
	@Override
	public String getPriceAsText() {
		return TextUtils.creditStyle(this.price);
	}//end of getPriceAsText()
	
	
	/**
	 * 우주선의 전면 총에서 발사되는 총알을 리턴합니다.
	 * 
	 * @return
	 */
	public Shot getShot() {
		return this.shot;
	}//end of getShot()
	
	
	@Override
	public String toString() {
		return String.format(Locale.KOREA, "%s (%s) - Damage : %d", this.name, this.getPriceAsText(), this.shot.getDamage());
	}//end of toString()

}
//end of FrontGun.java